home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
eflibpt4.zip
/
DEMO
/
STRINGS
/
DYNAMIC.PAS
next >
Wrap
Pascal/Delphi Source File
|
1996-08-08
|
921b
|
29 lines
{ Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
Demonstration; dynamic string handling
EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED. }
uses EFLIBDEF, EFLIBINI, EFLIBTXT;
var SomeString : StringObjectType;
begin
with SomeString do begin
{ Initialize a dynamic text string }
Initialize ('Dynamically allocated text string');
{ Display stored text }
WriteLn (Text, ' (', Succ(Length), ' bytes).');
{ Reallocate with another string }
Update ('Smaller allocation');
WriteLn (Text, ' (', Succ(Length), ' bytes).');
{ Intercept object (dispose allocated string) }
Intercept;
end;
end.